export function isObject(obj: any): boolean {
  return obj !== null && typeof obj === "object";
}

export function isFunction(obj: any): boolean {
  return obj !== null && typeof obj === "function";
}

const hasOwnProperty = Object.prototype.hasOwnProperty;
export function hasOwn(obj: Object | any[], key: string): boolean {
  return hasOwnProperty.call(obj, key);
}

const _toString = Object.prototype.toString;
export function isPlainObject(obj: any): boolean {
  return _toString.call(obj) === "[object Object]";
}
